<?php

namespace app\app\controller\order;

use app\api\model\Order;
use app\app\controller\AppBase;
use app\app\validate\order\VoucherValidate;

class Voucher extends AppBase
{
    protected $noNeedLogin = [];


    public function list()
    {
        $validate = new VoucherValidate();
        if (!$validate->scene('list')->check($this->params)) {
            $this->error($validate->getError());
        }

        $orderModel = new Order();
        $res = $orderModel->list($this->params);
        $this->success($res);
    }
}